package com.youlai.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.youlai.system.model.entity.SysFrequency;
import com.youlai.system.model.form.FrequencyForm;
import com.youlai.system.model.query.FrequencyPageQuery;
import com.youlai.system.model.vo.FrequencyPageVO;

import java.util.List;

/**
 * 评估频次业务接口
 */
public interface SysFrequencyService extends IService<SysFrequency> {

    /**
     * 评估频次分页列表
     *
     * @param queryParams
     * @return
     */
    Page<FrequencyPageVO> getFrequencyPage(FrequencyPageQuery queryParams);

    /**
     * 保存评估频次
     *
     * @param frequencyForm
     * @return
     */
    boolean saveFrequency(FrequencyForm frequencyForm);


    /**
     * 更新评估频次
     *
     * @param frequencyForm
     * @return
     */
    boolean updateFrequency(Long frequencyId, FrequencyForm frequencyForm);

    /**
     * 查询单个评估频次
     *
     * @param frequencyId
     * @return
     */
    FrequencyForm getFrequencyForm(Long frequencyId);

    /**
     * 删除评估频次列表
     *
     * @param idsStr
     * @return
     */
    boolean deleteFrequencies(String idsStr);

    /**
     * 删除评估频次列表
     *
     * @param idList
     * @return
     */
    boolean deleteFrequencies(List<Long> idList);


    /**
     * 获取某个职级下的故障科目ID集合
     *
     * @param gradeId
     * @return
     */
    List<Long> getCourseIdListByGradeId(Long gradeId);


    /**
     *
     * @param gradeId
     * @param courseId
     * @return
     */
    SysFrequency getOneByGradeIdAndCourseId(Long gradeId, Long courseId);

}
